<% layout('/layouts/default.html', {title: '执行任务情况分析(按机构)', libs: ['dataGrid']}){ %>
<div class="main-content">
    <div class="box box-main">
    <div class="box-header">
        <span style="color: red">追加条件：任务部署审核通过,细化分解任务需细化审核通过，第一次反馈时间未结束之前</span>
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-sm btn-primary" onclick="followOrg('${taskNo}')"  id="followOrg"> ${text('追加牵头单位')}</button>
        </div>
    </div>
    <div class="box-body">
    <#form:form id="searchForm"  action="${ctx}/taskdeploy/dcSupTaskInfo/taskLeaderOrgList?taskNo=${taskNo}" method="post" class="form-inline hide"
    data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">

</#form:form>
<table id="dataGrid"></table>
    </div>
</div>
<% } %>
<script>

        $("#dataGrid").dataGrid({
            searchForm: $("#searchForm"),
            columnModel: [
                {header:'牵头责任单位', name:'leader_org_name',  sortable:false, width:200, align:"left"},

            ],
            // 加载成功后执行事件
            ajaxSuccess: function(data){

            }

        });

        var btnStatus = ${btnStatus}
        if(!btnStatus){
            $('#followOrg').addClass('disabled')
        }
        function followOrg(taskNo){
            if(btnStatus){
                js.layer.open({
                    type: 2,
                    title: ['追加牵头单位'],
                    area: ['600px', '205px'],
                    scrollbar: true,
                    shadeClose: false,
                    content: "${ctx}/taskdeploy/dcSupTaskInfo/followOrgForm?taskNo="+taskNo,
                    btn1: function (index, layero) {

                    },
                    end:function () {
                        location.reload();
                    },
                    success:function (layero,index){
                        var body = layer.getChildFrame('body', index);
                        var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                        body.find('input').val('Hi，我是从父页来的')
                    }
                });
            }


        }




</script>